using System.Configuration;

namespace ChannelVN.Cached.Config
{
    public class AppConfigs
    {
        public static bool AllowWrite1Line
        {
            get
            {
                return ConfigurationManager.AppSettings["AllowWrite1Line"] == "1";
            }
        }
        public static bool AllowSqlDependencyCache
        {
            get
            {
                return ConfigurationManager.AppSettings["AllowSqlCache"] == "1";
            }
        }
        public static string DefaultMemcachedSectionName
        {
            get
            {
                return ConfigurationManager.AppSettings["DefaultMemcachedSectionName"];
            }
        }
        public static string MemcachedSectionNameForDataCached
        {
            get
            {
                return ConfigurationManager.AppSettings["MemcachedSectionNameForDataCached"];
            }
        }
        public static string CacheSettingFile
        {
            get
            {
                return ConfigurationManager.AppSettings["CacheSettingFile"];
            }
        }
        public static string UrlRewriteRuleSettingFile
        {
            get
            {
                return ConfigurationManager.AppSettings["UrlRewriteRuleSettingFile"];
            }
        }
        public static string _301RedirectionRuleSettingFile
        {
            get
            {
                return ConfigurationManager.AppSettings["301RedirectionRuleSettingFile"];
            }
        }
        public static string MetaRuleSettingFile
        {
            get
            {
                return ConfigurationManager.AppSettings["MetaRuleSettingFile"];
            }
        }
        public static string SecretCacheKey
        {
            get
            {
                return ConfigurationManager.AppSettings["SecretCacheKey"];
            }
        }
        public static string LogFolder
        {
            get
            {
                return ConfigurationManager.AppSettings["LogFolder"];
            }
        }
    }

    public class AppConnectionStrings
    {
        public static string ForCacheMonitor
        {
            get
            {
                return ConfigurationManager.ConnectionStrings["ChannelVN.Cached"].ConnectionString;
            }
        }
    }
}
